When natural image data is coded, by using JPEG for a static image, or by using MPEG for a moving image, effective data compression can be performed. On the other hand, as for CG image data such as a PC screen, in comparison with above method, by using a color palette-image coding method (each pixel is represented by a plurality of typical colors (palettes)), the data compression can be more effectively performed.
In the color palette-image coding method, following decisions are important, i.e., the target image is represented by which typical colors, and each pixel therein is represented by which typical color.
For example, by calculating a histogram of each color in an image block, conventional technique to determine a typical color of the image block based on the histogram is well known. In this technique, the histogram is calculated whenever one typical color is generated. Accordingly, great many calculation costs thereof are necessary. Furthermore, the histogram is calculated for all colors in the image block. Accordingly, in order to calculate the histogram, a memory having a very large capacity is necessary. As a result, for example, hardware-packaging of the memory (such as LSI) is difficult.